package com.wen.cms.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wen.cms.entity.CrmBanner;
import com.wen.cms.service.CrmBannerService;
import com.wen.commonutils.ResultEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author wen
 * @since 2021-06-13
 */
@RestController
@RequestMapping("/edu/cms/service/banner/front")
public class BannerFrontController {
    @Resource
    private CrmBannerService crmBannerService;

    /**
     * display all banner limit 2
     *
     * @return result of request
     */
    @GetMapping("findAll")
    public ResultEntity findAll() {
        List<CrmBanner> list = crmBannerService.selectAll();
        return ResultEntity.ok().data("list", list);
    }
}

